<html>
<head><meta charset="utf-8"><title>Support glob patterns · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html">Support glob patterns</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210022468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20glob%20patterns/near/210022468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Weihang Lo <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html#210022468">(Sep 14 2020 at 15:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/issues/8582">https://github.com/rust-lang/cargo/issues/8582</a> is about support glob pattern for args such as <code>--pacakge</code> and <code>--exclude</code>. I have already done a minimal proof-of-concept (also commented in that issue) and want to know if this feature is acceptable. In addition, I want to expand this feature a bit further. Could it be possible and worthy to support <code>CompileFilter</code> level glob patterns? That will make things like <code>cargo test --test "some-test-*"</code> become possible. I am happy to discuss and help.</p>



<a name="210040820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20glob%20patterns/near/210040820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html#210040820">(Sep 14 2020 at 17:56)</a>:</h4>
<p>It does seem useful. There's a little more discussion about using globs for target filters in <a href="https://github.com/rust-lang/cargo/issues/6454">https://github.com/rust-lang/cargo/issues/6454</a>. Some people want a way to run "integration tests but not unit tests" (though I'm not sure why), and something like <code>--tests=*</code> would address that. </p>
<p>But I'm a little concerned about the problems with shell quoting using <code>*</code>.  Offhand I don't have any alternate suggestions, though.  Maybe just mentioning that in the documentation would be enough?</p>



<a name="210151586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20glob%20patterns/near/210151586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Weihang Lo <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html#210151586">(Sep 15 2020 at 16:16)</a>:</h4>
<p>That's right. IIRC the only way to disable shell expansion is to turn off it in the shell settings. I guess we need to emphasize this behavior in the documentation.<br>
For implementations, I am plan to implement a version that support workspace package filter first, and then do the target filters part. Shall these two parts  be done in the same period or release?</p>



<a name="212232299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20glob%20patterns/near/212232299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Weihang Lo <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html#212232299">(Oct 04 2020 at 17:29)</a>:</h4>
<p>I've just created a pull request for this feature <a href="https://github.com/rust-lang/cargo/pull/8752">https://github.com/rust-lang/cargo/pull/8752</a>. Hope this would help.</p>



<a name="213300490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20glob%20patterns/near/213300490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Weihang Lo <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20glob.20patterns.html#213300490">(Oct 14 2020 at 14:52)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> In case you miss it, I’ve updated the PR based on the discussion. You can review it at your own pace 😄</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>